package com.ruoyi.base;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author chongjin
 * @date 2023/6/12
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class BaseResponse {

    private String code;

    private String msg;

    public static BaseResponse success() {
        return new BaseResponse("1", "成功");
    }

    public static BaseResponse success(String msg) {
        return new BaseResponse("1", msg);
    }

    public static BaseResponse error(String msg) {
        return new BaseResponse("-1", msg);
    }
}
